﻿using System;
using System.Windows.Data;
using System.Windows.Media;

namespace Convertor.Plugin.DispatchTemplate
{
    class TemplateListBGColorConverter : IMultiValueConverter
    {
        #region IMultiValueConverter 成员

        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string uniqueId = values[0] as string;
            var bindedTempalte = values[1] as Convertor.Interface.ITemplateToLoadViewModel;
            if (uniqueId != null && bindedTempalte != null && uniqueId == bindedTempalte.UniqueId)
            {
                //t.Path = values[3].ToString();
                return Brushes.Tomato;
            }
            else
            {
                return Brushes.Black;
            }
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
